import { MessageList } from "./message-list";
import { ChatInput } from "./chat-input";
import { SessionHeader } from "./session-header";
import { type MessageProps } from "@/store/useChatStore";

export interface Message {
  id: string;
  role: "user" | "character";
  content: string;
}

export default function ChatWindow({
  messages,
  sendMessage,
}: {
  messages: MessageProps[];
  sendMessage: (message: string) => void;
}) {
  return (
    <div className="flex flex-col justify-between h-full w-[60%] rounded-lg ml-[100px]">
      <SessionHeader title="AI 对话" />
      <MessageList messages={messages} />
      <ChatInput sendMessage={sendMessage} />
    </div>
  );
}
